#import "YeswaypayDemoPlugin.h"
#import "AlipaySDK.h"
#import "APayAuthInfo.h"
#import <YeswayPay/PayOrder.h>
#import <YeswayPay/PaySDK.h>
#import <YeswayPay/PaySDKDelegate.h>

@implementation YeswaypayDemoPlugin
+ (void)registerWithRegistrar:(NSObject<FlutterPluginRegistrar>*)registrar {
  FlutterMethodChannel* channel = [FlutterMethodChannel
      methodChannelWithName:@"yeswaypay_demo_plugin"
            binaryMessenger:[registrar messenger]];
  YeswaypayDemoPlugin* instance = [[YeswaypayDemoPlugin alloc] init];
  [registrar addMethodCallDelegate:instance channel:channel];
    [[PaySDK sharedPaySDK]startPayment:@"ddd" Environment:@"dddd"];
}

- (void)handleMethodCall:(FlutterMethodCall*)call result:(FlutterResult)result {
  if ([@"getPlatformVersion" isEqualToString:call.method]) {
    result([@"iOS " stringByAppendingString:[[UIDevice currentDevice] systemVersion]]);
  } else {
    result(FlutterMethodNotImplemented);
  }
}

@end
